package cn.tedu.coolshark.mapper;

import cn.tedu.coolshark.entity.Hot;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HotMapper {

    @Select("select id,title,article,url from hot")
    List<Hot> select();

    @Select("select id from hot where id=#{id}")
    String selectUrlById(int id);

    @Delete("delete from hot where id=#{id}")
    void deleteById(int id);
}
